import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { Routes, RouterModule } from '@angular/router';
import { DesignComponent } from './design.component';
import { AiComponent } from './ai/ai.component';
import { PsComponent } from './ps/ps.component';
import { WebComponent } from './web/web.component';
import { MobileComponent } from './web/mobile/mobile.component';
import { PcComponent } from './web/pc/pc.component';
const designRoutes: Routes= [
  {path: '', component: DesignComponent, children: [
    {path: 'ai', component: AiComponent},
    {path: 'ps', component: PsComponent},
    {path: 'web', component: WebComponent, children:[
      {path: 'mobile', component: MobileComponent},
      {path: 'pc', component: PcComponent}
    ]}
  ]}
];

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(designRoutes)
  ],
  declarations: [
    DesignComponent,
    AiComponent,
    PsComponent,
    WebComponent,
    MobileComponent,
    PcComponent
  ]
})
export class DesignModule { }
